//
//  DDOrderSet.h
//  Dingdong
//
//  Created by 程强 on 16/11/26.
//  Copyright © 2016年 程强. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DDGoodsObj.h"
#import "DDStoreObj.h"

@class DDOrderObjItem;
@class DDOrderItemInfo;
@class DDOrderInfo;

/**
 订单集合
 */
@interface DDOrderSet : NSObject
@property (strong, nonatomic) NSMutableArray *orderAry;
@end


/**
 大订单
 */
@interface DDOrderObj : NSObject
@property (strong, nonatomic) DDOrderInfo *order;
@property (strong, nonatomic) NSArray <DDOrderObjItem *> *orderItemGoodsList;
@end


/**
 子订单
 */
@interface DDOrderObjItem : NSObject
@property (strong, nonatomic) DDGoodsObj *goods;
@property (strong, nonatomic) DDOrderItemInfo *orderItem;
@property (strong, nonatomic) DDStoreObj *store;
@end


/**
 大订单信息
 */
@interface DDOrderInfo : NSObject
@property (strong, nonatomic) NSNumber *order_id;
@property (copy, nonatomic) NSString *sn;
@property (strong, nonatomic) NSNumber *member_id;
@property (strong, nonatomic) NSNumber *status;/**0:新建订单，货到付款需确认 1:已确认 2:已支付 3:已发货 4:已收货 5:已完成 6:订单取消 7:交易成功已申请收货*/
@property (strong, nonatomic) NSNumber *pay_status;
@property (strong, nonatomic) NSNumber *ship_status;
@property (copy, nonatomic) NSString *shipStatus;
@property (copy, nonatomic) NSString *payStatus;
@property (copy, nonatomic) NSString *orderStatus;
@property (copy, nonatomic) NSString *regionid;
@property (strong, nonatomic) NSNumber *shipping_id;
@property (copy, nonatomic) NSString *shipping_type;
@property (copy, nonatomic) NSString *shipping_area;
@property (strong, nonatomic) id goods;
@property (strong, nonatomic) NSNumber *create_time;
@property (copy, nonatomic) NSString *ship_name;
@property (copy, nonatomic) NSString *ship_addr;
@property (copy, nonatomic) NSString *ship_zip;
@property (copy, nonatomic) NSString *ship_email;
@property (copy, nonatomic) NSString *ship_mobile;
@property (copy, nonatomic) NSString *ship_tel;
@property (copy, nonatomic) NSString *ship_day;
@property (copy, nonatomic) NSString *ship_time;
@property (strong, nonatomic) NSNumber *is_protect;
@property (strong, nonatomic) NSNumber *protect_price;
@property (strong, nonatomic) NSNumber *goods_amount;
@property (strong, nonatomic) NSNumber *shipping_amount;
@property (strong, nonatomic) NSNumber *discount;
@property (strong, nonatomic) NSNumber *order_amount;
@property (strong, nonatomic) NSNumber *weight;
@property (strong, nonatomic) NSNumber *paymoney;
@property (copy, nonatomic) NSString *remark;
@property (strong, nonatomic) NSNumber *disabled;
@property (strong, nonatomic) NSNumber *payment_id;
@property (copy, nonatomic) NSString *payment_name;
@property (copy, nonatomic) NSString *payment_type;
@property (copy, nonatomic) NSString *payment_account;
@property (strong, nonatomic) NSNumber *goods_num;
@property (strong, nonatomic) NSNumber *gainedpoint;
@property (strong, nonatomic) NSNumber *consumepoint;
@property (strong, nonatomic) NSNumber *depotid;
@property (copy, nonatomic) NSString *cancel_reason;
@property (strong, nonatomic) NSNumber *sale_cmpl;
@property (strong, nonatomic) NSNumber *sale_cmpl_time;
@property (strong, nonatomic) NSNumber *ship_provinceid;
@property (strong, nonatomic) NSNumber *ship_cityid;
@property (strong, nonatomic) NSNumber *ship_regionid;
@property (strong, nonatomic) NSNumber *signing_time;
@property (copy, nonatomic) NSString *the_sign;
@property (strong, nonatomic) NSNumber *allocation_time;
@property (copy, nonatomic) NSString *admin_remark;
@property (strong, nonatomic) NSNumber *address_id;
@property (strong, nonatomic) NSNumber *need_pay_money;
@property (copy, nonatomic) NSString *ship_no;
@property (strong, nonatomic) NSNumber *logi_id;
@property (copy, nonatomic) NSString *logi_name;
@property (strong, nonatomic) NSNumber *gift_id;
@property (strong, nonatomic) NSNumber *bonus_id;
@property (strong, nonatomic) NSNumber *act_discount;
@property (strong, nonatomic) NSNumber *is_cancel;
@property (copy, nonatomic) NSString *uname;
@property (strong, nonatomic) NSNumber *order_exchange_point;
@property (strong, nonatomic) NSNumber *needPayMoney;
@property (copy, nonatomic) NSString *orderType;
@property (assign, nonatomic) BOOL isCod;
@property (assign, nonatomic) BOOL isOnlinePay;
+ (kOrderStatus)mappingOrderStatus:(NSNumber *)status;
@end

/**
 子订单信息
 */
@interface DDOrderItemInfo : NSObject
@property (strong, nonatomic) NSNumber *item_id;
@property (strong, nonatomic) NSNumber *order_id;
@property (strong, nonatomic) NSNumber *goods_id;
@property (strong, nonatomic) NSNumber *product_id;
@property (strong, nonatomic) NSNumber *num;
@property (strong, nonatomic) NSNumber *ship_num;
@property (copy, nonatomic) NSString *name;
@property (copy, nonatomic) NSString *sn;
@property (copy, nonatomic) NSString *image;
@property (strong, nonatomic) id store;
@property (copy, nonatomic) NSString *addon;
@property (strong, nonatomic) NSNumber *cat_id;
@property (strong, nonatomic) NSNumber *price;
@property (strong, nonatomic) NSNumber *gainedpoint;
@property (strong, nonatomic) NSNumber *state;
@property (copy, nonatomic) NSString *change_goods_name;
@property (copy, nonatomic) NSString *change_goods_id;
@property (copy, nonatomic) NSString *unit;
@property (copy, nonatomic) NSString *depotId;
@property (strong, nonatomic) NSNumber *goods_type;
@property (copy, nonatomic) NSString *other;
@property (copy, nonatomic) NSString *exchange;
@property (copy, nonatomic) NSString *exchange_point;
@property (copy, nonatomic) NSString *commentState;
@end
